<?php 

include '../function.php';

var_dump($_GET);
var_dump($_POST);

var_dump($_FILES);

exit;

var_dump(current($_FILES));


if($_FILES['xbs']['size']<30000){
	move_uploaded_file($_FILES['xbs']['tmp_name'], "./upload/".$_FILES['xbs']['name']);

}

$fname = $_FILES['xbs']['name'];

$fnameArr = explode('.', $fname);

$name = end($fnameArr);

var_dump($name);


$allowType= ['jpg','png','gif'];


if(in_array($name, $allowType)){
	echo "上传成功";
}else{
	echo "该类型不允许上传";
}









 ?>